package com.old.db;

import java.text.SimpleDateFormat;

public class Constant {
	private static final long serialVersionUID = 1L;

	public static final SimpleDateFormat sdf_yyyyMMdd_HHmmss = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static final long //
			Second = 1000, //
			Minute = 60 * Second, //
			Hour = 60 * Minute;
	public static final long //
			Kilo = 1024, //
			Mega = Kilo * Kilo, //
			Giga = Mega * Kilo, //
			Tera = Giga * Kilo, //
			Peta = Tera * Kilo;

	public static final int CronAverageLength = 10;

	public static final int DefaultSpeed = 5;

	//public static boolean Worker;
	public static String Server_Version;

	public static int StatisticPeriodInMinutes = 15;

	public static int HealthWorkingThreads = 3;
	public static int JobWorkingThreads = 3;

	public static int MaxServerId = 5000;

	public static final long DefaultCountWindowTime = 15 * Minute;

	public static byte //
			OP_COPY = 1, //
			OP_DEL = 2, //
			OP_SPREAD = 3, //
			OP_MOVE = 4;

	public final static String VersionNumber = "0.91." + GetVersion();

	private static String GetVersion() {
		String date = "$Date: 2011-06-09 13:32:38 +0800 ";
		String rev = "$Rev: 1509 $";
		int n = date.indexOf('-');
		return date.substring(n + 1, n + 3) + date.substring(n + 4, n + 6) + "." + rev.substring(6, rev.length() - 2);
	}
}